package com.kx.demo.namenode;

/**
 * NameNode的rpc服务的接口
 *
 * @author kx
 */
public class NameNodeRpcServer {

    /**
     * 负责管理元数据的核心组件
     */
    private FSNameSystem nameSystem;

    public NameNodeRpcServer(FSNameSystem nameSystem) {
        this.nameSystem = nameSystem;
    }

    /**
     * 启动监听
     */
    public void start() {
        System.out.println("RPCServer启动监听端口80...");
    }

    /**
     * 创建目录
     *
     * @param path 目录
     * @return 结果
     * @throws Exception 异常
     */
    public Boolean mkdir(String path) throws Exception {

        return this.nameSystem.mkdir(path);
    }

}
